import java.lang.reflect.Array;
import java.util.Arrays;

public class Main {
    public static void main(String[] args) {
        int[] array = new int[]{5,1,2,6,3,4,7,5};
        int left = 0;
        int right = array.length-1;
        //插入排序-直接插入
/*        Sort.insertSort(array);
        System.out.println(Arrays.toString(array));*/

        //插入排序-希尔排序
/*        Sort.shellSort(array);
        System.out.println(Arrays.toString(array));*/

        //选择排序-直接选择排序
/*        Sort.selSort(array);
        System.out.println(Arrays.toString(array));*/

        //选择排序-堆排序
/*        Sort.heapSort(array);
        System.out.println(Arrays.toString(array));*/

        //交换排序-冒泡排序
/*        Sort.bubbleSort(array);
        System.out.println(Arrays.toString(array));*/
        //交换排序-快速排序
/*        int[] arr = new int[]{1,2,3,4,5,6,7};
        Sort.quickSort1(array, 0, right);
        System.out.println(Arrays.toString(array));*/

        //快速排序优化
/*        Sort.unDfs(array, 0, right);
        System.out.println(Arrays.toString(array));*/
        //快速排序非递归
        Sort.divide(array, 0, right);
        System.out.println(Arrays.toString(array));
    }
}